package com.study.extendenum;

import java.util.Arrays;
import java.util.Collection;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		double x = 4.000000;
		double y = 2.000000;
		
		test(Arrays.asList(BasicOperation.values()), x, y);
	}

	private static void test(Collection<? extends IOperation> opSet, double x, double y) {
		for(IOperation op  : opSet){
			System.out.printf("%f %s %f = %f%n", x, op, y, op.apply(x, y));
		}
	}

}
